<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template("content","header"); ?>
 <div id="info">
  <div class="crumbs"><a href="<?php echo siteurl($siteid);?>">首页</a><span> > </span><?php echo catpos($catid);?> 列表</div>
</div>
<?php
function leftmenu($rootid){
    ?>
    <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=908e98fee724370aae1c9bffadf4f44c&action=category&catid=%24rootid&siteid=%24siteid&order=listorder+ASC\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'category')) {$data = $content_tag->category(array('catid'=>$rootid,'siteid'=>$siteid,'order'=>'listorder ASC','limit'=>'20',));}?>
      <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
      <?php
      if(count($data) == 0){
      return;
      }
      $c = $r['arrchildid'];
      $c = explode(',',$c);
      if(count($c) != 1){
      ?>
      <li onmouseover="displaySubMenu(this)" onmouseout="hideSubMenu(this)">
      <a href="<?php echo $r['url'];?>"><?php echo $r['catname'];?></a>
      <ul  class="left_submenu">
      <?php menu($r['catid']);?>
      </ul>
      </li>
      <?php
      }else if(count($c) == 1){
      ?>
      <li><a href="<?php echo $r['url'];?>"><?php echo $r['catname'];?></a></li>
      <?php
      }
      ?>
      <?php $n++;}unset($n); ?>
      <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
      <?php 
      }
?>
 <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"get\" data=\"op=get&tag_md5=343dca9f23215e3c5e1d304f8362eddc&sql=select+%2A+from+phpcms_category+where+catid+in%28%24catid%29&return=data\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}pc_base::load_sys_class("get_model", "model", 0);$get_db = new get_model();$r = $get_db->sql_query("select * from phpcms_category where catid in($catid) LIMIT 20");while(($s = $get_db->fetch_next()) != false) {$a[] = $s;}$data = $a;unset($a);?>
        <?php $parentid = intval($data[0]['parentid']);?>
  <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
  <li style="border-radius: 4px 4px 0 0;width: 190px;list-style:none;
border-bottom: 1px solid white;
background-color: #356CB6;
height: 40px;
line-height: 40px;
text-indent: 2em;font-size:20px;color:#fff;
color: white;
font-weight: bold;
font-size: 20px;">
<?php echo $CATEGORYS[$parentid]['catname'];?></li>
<div class="left_menu">
 <ul>
 
  <?php leftmenu($parentid);?>
</ul>  
</div> 
     
<div id="con_r1">
  <h1><?php echo $catname;?></h1>
    <div id="news">
      <ul id="grid">
          <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=6401a2ce199d1b88bccfc45608b989cc&action=lists&catid=%24catid&num=15&order=id+DESC&page=%24page\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'lists')) {$pagesize = 15;$page = intval($page) ? intval($page) : 1;if($page<=0){$page=1;}$offset = ($page - 1) * $pagesize;$content_total = $content_tag->count(array('catid'=>$catid,'order'=>'id DESC','limit'=>$offset.",".$pagesize,'action'=>'lists',));$pages = pages($content_total, $page, $pagesize, $urlrule);$data = $content_tag->lists(array('catid'=>$catid,'order'=>'id DESC','limit'=>$offset.",".$pagesize,'action'=>'lists',));}?>

                    <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
                      <li>
                      <span><?php echo date('Y-m-d',$r[inputtime]);?></span>
                      <a href="<?php echo $r['url'];?>" target="_blank"<?php echo title_style($r[style]);?>><?php echo str_cut($r[title],100)?></a>
                      </li>
                <!--       <?php if($n%5==0) { ?><li class="bk20 hr"style="border-bottom:dashed 1px #ffffff;"></li><?php } ?> -->
                    <?php $n++;}unset($n); ?>

            <div id="pages" class="text-c"><?php echo $pages;?></div>
          <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
      </ul>
    </div>
  </div>
<?php include template("content","footer"); ?>